home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-12-03 | 14.1 KB | 270 lines | [TEXT/Earl] |
- This is an alpha distribution of MicroEmacs 3.10 as ported to the
- Macintosh Operating System. It consists of the following files in
- StuffIt archive format.
-
- mac_dist_info This file
- emacs.tut A copy of the MicroEmacs tutorial
- emacs A Macintosh application
- emacs.rc MicroEmacs startup file, place in System Folder
- readme Dan Lawrence's notes on version 3.10
- emacs.hlp MicroEmacs 3.10 help file
-
- The "emacs" file implements the MicroEmacs program as a Macintosh
- application. It provides a terminal emulator in which the MicroEmacs
- program displays its output, as well as some additional Macintosh
- specific services discussed below. Additional information not
- available in this distribution may be obtained by writing to the author
- of MicroEmacs, Dan Lawrence, at the address listed in the application's
- "About" box. I have mailed Dan copies of the source to the Macintosh
- port, and I sincerely hope that he will be able to incorporate the
- Macintosh sources into the next official version of MicroEmacs. To
- make full use of the program, it will be advantageous to obtain a copy
- of the MicroEmacs manual. This is a rather large document and explains
- most everything there is to know about using MicroEmacs. Requests to
- Dan should probably be accompanied by a suitable donation. Other
- sources of MicroEmacs manuals and source code are various Internet ftp
- sites and bulletin boards. The program runs on a number of computer
- lines, and information for it may therefore be found in areas devoted
- to IBM PC, Atari, Amiga, etc.
-
- It will be useless to send requests for information to me, as I return
- this Mac II to Dartmouth tomorrow, I move to Seattle in two weeks, and I
- begin my career as a Windows/DOS system programmer on Jan. 2, 1990.
-
- The Macintosh version of MicroEmacs has several features which make it
- different from versions for other systems, because of the nature of the
- Macintosh User Interface and Operating System. Let us discuss the
- terminal emulator first, for lack of a better place to start.
-
- MicroEmacs for the Macintosh has eight menus. The three menus on the
- right control the appearance of the text in the terminal emulator
- window. The font menu selects a window font from any of the installed
- fonts in your system. The size menu lets you choose from any of six
- sizes of text, whether the chosen size exists in the selected font or
- not. If the size selection is missing a size that you want, then you
- may install more sizes using a resource editor such as Apple's ResEdit.
- Just add another menu item containing an ASCII representation of an
- integer. The options menu allows you to hide or show the scroll bar,
- and to select or deselect bold font style. If you select invisible
- scroll bar, Courier 12, and plain style, then you have a window which
- looks just like the A/UX Console Emulator.
-
- MicroEmacs 3.10 has had its status messages translated into several
- foreign languages. Other versions allow the desired language to be
- specified at compile time, and the status messages are taken from a
- language specific header file. The Macintosh version has all of the
- available language specific header files loaded into it as resources.
- If you would like to see all messages in Deutsch (German), then select
- "Deutsch" from the Language menu. If you are a Pig Roman, then select
- "Igpay Atinlay" (Pig Latin) from the Language menu. Dan Lawrence is
- looking for volunteers to translate these messages into more languages.
-
- The default settings for language and terminal options may be set by use
- of pseudo environmental variables, contained in named 'STR ' resources
- in the application file. To change one of the defaults, open the
- application with a resource editor and alter the named string as
- follows:
-
- "LANGUAGE" -- Name of desired 'LANG' resource.
- "FONT" -- Name of desired font. If this font is not
- found, uses the System Font.
- "SIZE" -- Text size. An ASCII integer representation.
- "SCROLLY" -- Width of scroll bar. ASCII integer.
- "SCROLLYSHOW" -- Whether to show the scroll bar initially.
- First character is significant, if it is 'n'
- or 'N' then scroll bar is hidden. Anything
- else means show it.
- "Ja" -> show it.
- "Nein" -> hide it.
- "PATH" -- Place to look for "emacs.rc" startup file.
- System folder is default.
-
- Please do not distribute copies of this program which have the default
- settings changed.
-
- The MicroEmacs window allows you to display text in a proportional
- font. Unfortunately, MicroEmacs expects its terminal to have lines
- which hold a fixed maximum number of characters. When a proportional
- font is active, then the virtual terminal is sized according to the
- width of the ASCII space (' ') character. This means that some lines
- may extend off the right end of the window without emacs knowing about
- it, if they contain lots of characters wider than a space. Program
- behavior in this situation may differ from that described in the
- tutorial. The text may be still scrolled into view using the mouse.
- Place the cursor over the text. Press the mouse button, and drag
- horizontally to the left. The window contents should scroll to the
- left, making the text visible. The message line is always displayed in
- a mono-spaced font. The window font is used if it is mono-spaced,
- Monaco is used if not. Me, I like to edit Pascal programs using Symbol
- 18.
-
- MicroEmacs 3.10 now has a mouse-modifier for keystrokes which it
- understands. Unfortunately, many of the mouse operations which are
- possible on the Macintosh do not have matching functions in the mouse
- interpreter built into the MicroEmacs kernel. For this reason, some
- mouse operations operate directly, and some are sent to MicroEmacs as
- escape sequences, which may be redound by the more adventurous user.
- Mousing in the MicroEmacs window is perhaps not in the same state which
- will apply in the final version. I will attempt to describe the
- options which now exist.
-
- The scroll bar works by default in the normal manner. The buttons
- scroll the active window up or down. The thumb is used to go to a
- vertical position within the window's buffer. These are not presently
- implemented as escape sequences, both for performance reasons and
- because MicroEmacs does not yet have kernel code to mimic
- TrackControl(). The two page regions map rather directly to the
- MicroEmacs commands "next-page" and "previous-page," so I have assigned
- escape sequences to them. If you want to rebind "MSj" and "MSi," then
- you will get different behavior from page-up and page-down regions in
- the scroll bar control.
-
- Mousing in the window grow area generates the escape sequence "MS1" and
- sends MicroEmacs the desired x and y coordinates of the new window
- size. MicroEmacs then requests the terminal to assume the new size.
- Maximum coordinates are 254 by 254. Rebinding this function is not
- desirable, but this information may be used to set the default window
- size in your "emacs.rc" startup file. Here is an example.
-
- ;
- ; Set the window size to 100 by 20 characters.
- set $xpos 100
- set $ypos 20
- mouse-resize-screen
-
- This may be done interactively by a sequence of "META-x" commands, but
- would be considerably slower than using the mouse. This sort of thing
- may be handy to know when designing a startup file, however.
-
- The MicroEmacs kernel currently understands two kinds of mouse commands,
- presumably having to do with two mouse buttons.
-
- "Mouse-move" commands allow one to move the text cursor and to drag the
- window contents in a decidedly un-Macintosh manner. Mode lines can be
- moved also. This mode is accessed using the mouse in conjunction with
- the command key,
-
- "Mouse-region" commands do things with the region. These are accessed
- using the shift key. Shift drags define a region and copy it. Shift
- dragging a mode line deletes the associated window. Shift clicking on
- the insertion point causes a yank of the kill buffer to the insertion
- point. Shift dragging a mode line deletes its window.
-
- Experiment with these two modes. You may like them. They both have the
- problem that there is little interactive feedback to mouse actions while
- the button is still down.
-
- A third mode does not use MicroEmacs mouse escape sequences, but rather
- operates directly upon the window contents. This is actuated by
- clicking the mouse with no modifier keys. A simple click, either in
- text or in a mode line, moves the insertion point into the window where
- the click was made. A double click in a mode line moves to that window
- and then does a next-buffer command. A double click in text sets the
- mark at the click point, and moves the point to the previous mark.
- This refers to mark 0. Simple dragging defines a region, as in
- shift-clicking but in a more interactive fashion. Drags may extend off
- the edge of the window, in which case more text is scrolled into view.
- The region thus defined is not hilighted, because a region is
- conceptually different from a Macintosh selection range. Typing
- anything will delete a selection range, while you need an explicit kill
- command to delete a region, for example. Mode lines may be dragged to
- resize their windows. If you drag a mode line up far enough, you
- delete its window. If there is only one window, dragging its mode line
- creates another window for you. Dragging the bottom mode line resizes
- the bottom window, but does not move the mode line.
-
- For your safety, clicking the mouse or attempting a MenuKey operation
- aborts any message line or incremental-search activity which is
- currently taking place.
-
- The MicroEmacs keyboard interface is simple, and only does what key
- translation is necessary for sanity. The command key is mapped
- directly to control, because I prefer to use the command key and
- because Macintosh Plus users do not have a control key. Menu key
- equivalents are accessed by using command-shift instead of command. To
- cut something, hold down command and shift, then press enter. The four
- arrow keys are mapped to the MicroEmacs cursor movement commands, ^N,
- ^B, ^F, and ^P. Command-arrow combinations are not mapped, and are not
- bound, so you may map these to anything you like. Enter is mapped to
- ^J, because that makes more sense to me than ^C. Command-space is
- mapped to NUL, because there is no way to generate a NUL on Apple
- keyboards that I know of. Command-6 is mapped to ^^ for the same
- reason.
-
- Beyond this, the Macintosh version of MicroEmacs does no key mapping of
- its own. If you have an Apple Extended Keyboard, then you have fifteen
- ^P keys, all in a row. These keys, and the other special function
- keys, should be remapped using a keyboard remapping utility such as
- Macro Maker, Quick Keys, or AutoMac.
-
- I have had numerous requests for a version of Macintosh MicroEmacs where
- the option key serves as a META key. Forget it. The option key is for
- generating Macintosh extended character set characters, including
- diacritical marks such as those used in many non-English languages.
-
- The MicroEmacs Buffer menu is used to select the working buffer, and to
- show the status of all buffers. Active buffers are in plain style or
- italic. If a buffer is in the modified state, then the buffer name is
- italicized. Inactive buffers are shown in outline style. If you
- activate MicroEmacs by double-clicking a bunch of documents, and not all
- documents have been read in yet, then a number of entries in the buffer
- menu will appear in outline style. Select a buffer by choosing its name
- from the buffer menu.
-
- The Edit menu supports Cut, Copy and Paste. You can Cut or Copy the
- region. You can paste any text in the clipboard at the point in the
- current window. Do not attempt to Cut or Copy very large areas of text
- at a time. MicroEmacs does its own memory management, and only leaves
- 64k over for use by system routines. The maximum size of a Cut block of
- text is probably about 32k. MicroEmacs does not support Undo.
-
- The Macintosh version of MicroEmacs supports a standard File Menu. This
- may be used to access files using Apple's Standard File package, which
- should be familiar to all but the most novice Macintosh users.
- MicroEmacs can also access files directly using find-file and related
- commands. The MicroEmacs built-in file commands all require that a file
- name be given as a pathname or that the file reside in the default
- directory. The default directory is that folder holding the last file
- in MicroEmacs' Finder argument list.
-
- MicroEmacs keeps track of a file's location by pathname. This version
- of the Macintosh port does so, also. This method has the chief
- disadvantage that pathnames on the Macintosh can be ambiguous. Don't
- create problems for yourself by working with different volumes which
- have the same name. If you find this to be a restriction, then you are
- welcome to get a copy of the MicroEmacs sources and rework all the file
- handling routines to use Macintosh directory IDs.
-
- This copy of MicroEmacs uses the _UprString system call to build a set
- of case translation tables, instead of using the woefully inadequate
- ctype.h. For this reason case-change operations and word operations
- should work properly in all single byte character sets. In practice,
- however, _UprString seems to have problems in all the System versions I
- have tried. Specifically, it does not seem to recognize that 'ß' is a
- letter, even with the Deutsch version of 6.0.3 that I use. Dan
- Lawrence's "readme" file describes how to remedy this problem by
- overriding the case translation tables.
-
- Try it out by jumping über the word über in this sentence using M-f or
- M-b. Or, for the more adventurous, position just before the following
- nonsense word, and try M-u!
-
- éñøüäöœ
-
- Any problems with the way the Macintosh system interprets the case or
- alphabetic status of a character may be resolved by over-riding the case
- translation tables as described in Dan's "readme" file.
-
- Now, let's try to fix the problem with ß, so that we can capitalize
- "Straßburg." Copy the following line to a buffer, and execute the
- buffer.
-
- nop &slo "ß" "ß"
-
- Once you have this done, go back and try to "case-word-capitalize"
- Straßburg. It should work properly this time!
-
- Earle R. Horton
- Sun. Dec. 3 1989
-
-